home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / codelib7 / v_09_02 / 9n02098a < prev    next >
Encoding:
Text File  |  1995-11-01  |  331 b   |  12 lines

  1.  
  2.  
  3. void *sbrk(int n);      // prototype for sbrk
  4.  
  5. char *p,*q;             // two pointers for allocated blocks
  6.  
  7. p = (char *)sbrk(100);  // allocate a 100-byte block
  8. q = (char *)sbrk(200);  // allocate a 200-byte block
  9.  
  10. sbrk(-200);             // free the 200-byte block
  11. sbrk(-100);             // free the 100-byte block
  12.